package com.ams.entity;

import java.io.Serializable;
import java.sql.Timestamp;



import com.ams.util.Constants;
import com.ams.util.TimeFormat;


public class Product implements Serializable{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2004972870856603618L;


	private int productId;
	
	
	private ProductKind productKind;
	private Assest assest;
	
	/*@Transient
	private String proDateStr,endDateStr;*/
	
	private String proName,brand,model,facatory,supplier,productCode;
	
	private float price;
	
	private Timestamp proDate,endDate;
	
	public Product(){}

	public int getProductId() {
		return productId;
	}

	public void setProductId(int productId) {
		this.productId = productId;
	}

	public ProductKind getProductKind() {
		return productKind;
	}

	public void setProductKind(ProductKind productKind) {
		this.productKind = productKind;
	}

	public String getProName() {
		return proName;
	}

	public void setProName(String proName) {
		this.proName = proName;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getFacatory() {
		return facatory;
	}

	public void setFacatory(String facatory) {
		this.facatory = facatory;
	}

	public String getSupplier() {
		return supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}

	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public Timestamp getProDate() {
		return proDate;
	}

	public void setProDate(Timestamp proDate) {
		this.proDate = proDate;
	}

	public Timestamp getEndDate() {
		return endDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}
	

	public Assest getAssest() {
		return assest;
	}

	public void setAssest(Assest assest) {
		this.assest = assest;
	}

	public String getProDateStr() {
		return TimeFormat.translateTimestampToString(proDate, Constants.DATE_FORMAT);
	}

	public void setProDateStr(String proDateStr) {
		this.proDate=TimeFormat.translateStringToTimestamp(proDateStr,  Constants.DATE_FORMAT);
	}
	

	public String getEndDateStr() {
		return TimeFormat.translateTimestampToString(this.endDate, Constants.DATE_FORMAT);
	}

	public void setEndDateStr(String endDateStr) {
		this.endDate=TimeFormat.translateStringToTimestamp(endDateStr, Constants.DATE_FORMAT);
	}
	
	
}
